package com.toy.vo;

import com.toy.entity.Product;
import com.toy.entity.ProductCategory;
import lombok.Data;

import java.util.List;

/**
 * @author tystart
 * @create 2022-09-02-19:57
 */
@Data
public class ProductCategoryVO {
   private Integer id;
   private String name;
   private Integer parentId;
   private List<ProductCategoryVO> children;
   private List<Product> productList;

   public ProductCategoryVO(ProductCategory productCategory) {
      this.id = productCategory.getId();
      this.name = productCategory.getName();
      this.parentId = productCategory.getParentId();
   }
}
